package ups.Common;

import java.util.Date;

public class Departure {
	private String shipName;
	private String portName;
	int 	routeID;
	Date	date;
	Date	scheduled_time;
	Date	actual_time;
	public Departure(String shipName, String portName, int routeID, Date date, Date scheduled_time, Date actual_time) {
		super();
		this.shipName = shipName;
		this.portName = portName;
		this.routeID = routeID;
		this.date = date;
		this.scheduled_time = scheduled_time;
		this.actual_time = actual_time;
	}
	public Date getActualTime() {
		return actual_time;
	}
	public void setActualTime(Date actual_time) {
		this.actual_time = actual_time;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	public String getPortName() {
		return portName;
	}
	public void setPortName(String portName) {
		this.portName = portName;
	}
	public int getRouteID() {
		return routeID;
	}
	public void setRouteID(int routeID) {
		this.routeID = routeID;
	}
	public Date getScheduledTime() {
		return scheduled_time;
	}
	public void setScheduledTime(Date scheduled_time) {
		this.scheduled_time = scheduled_time;
	}
	public String getShipName() {
		return shipName;
	}
	public void setShipName(String shipName) {
		this.shipName = shipName;
	}
	public int lateness() {
		return (60 * (getActualTime().getHours() - getScheduledTime().getHours())) + getActualTime().getMinutes() - getScheduledTime().getMinutes();
	}
}
